package com.ssyx.order.feign;

import com.ssyx.model.order.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * ClassName:CartFeignClient
 * Description:
 *
 * @Author kay
 * @Create 2024/5/22 9:42
 * @Version 1.0
 */
@FeignClient(value = "service-cart")
public interface CartFeignClient {

    //根据用户id得到,购物车中被选中的商品项列表
    @GetMapping("/api/cart/inner/getCartCheckedList/{userId}")
    List<CartInfo> getCartCheckedList(@PathVariable("userId") Long userId);

    //批量删除购物车商品
    @PostMapping("/api/cart/inner/batchDeleteCart/{userId}")
    Boolean batchDeleteCart(@RequestBody List<Long> skuIdList,
                            @PathVariable Long userId);

    //删除购物车中,被选中的商品
//    @DeleteMapping("/api/cart/inner/removeCartChecked")
//    Boolean removeCartChecked();
}
